<?php
include 'conn_mysql.php';

$id=$_REQUEST['id'];//用户编码
$id_difang=$_REQUEST['id_difang'];//用户所选项目识别码，用于计算最终价格

//查询用户信息
$sql="select * from main_user where id_self='".$id_main."'";
$query = mysql_query($sql);
while($row = mysql_fetch_array($query)){
	$id=$row['id_self'];
	$name=$row['name'];
	$phone=$row['phone'];
	$idcode=$row['idcode'];
	$choose=$row['choose'];
	$textarea=$row['textarea'];
	$checkbox=$row['checkbox'];
	$banqi=$row['banqi'];
}
?>
<!doctype html>
<html lang="zh-CN">
<head>
	<meta name="format-detection" content="telephone=no">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta name="viewport" content="width=device-width, maximum-scale=1, user-scalable=no">
    <title>驴行天下</title>
    <link href="bootstrap.min.css" rel="stylesheet">
    <link href="style.css" rel="stylesheet" type="text/css">
	<script language="javascript" src="js/jquery.min182.js"></script>
	<script language="javascript" src="js/jquery.form.js"></script>
	<script language="javascript" src="js/json.parse.js"></script>
    <script type="text/javascript" src="js/jquery.js"></script>
</head>
<body>

		<?php
		//查看订单是否已取消或已支付
		if($id_main)
		{
			$sql="select id_self,is_zhifu from main_user where id_self='$id_main' ";
			$query = mysql_query($sql);
			while($row = mysql_fetch_array($query)){
				$this_id_self=$row['id_self'];
				$is_zhifu=$row['is_zhifu'];
			}
			if(!$this_id_self)
			{
				echo "<SCRIPT>alert('订单不存在');window.history.go(-1);</SCRIPT>";
				exit;
			}

			if($is_zhifu>0)
			{
				echo "<SCRIPT>alert('订单已支付或已取消无法添加游客');window.history.go(-1);</SCRIPT>";
				exit;
			}
		}


	?>
	
<!--header-->
<div class="header_title">
	<!--<p>【贵州精华】2016全年贵州：西江千户苗寨-朗德上寨-荔波小七孔-黄果树瀑布-青岩古镇，奇山秀水、苗家风情之旅6日团</p>-->
	<p><?php echo $biaoti;?></p><!--旅游项目标题-->
</div>
<!--plate-->
<div class="plate">
	<h1>修改备注</h1>
	<div class="plate_line">
    	<div class="plate_line_name">备&nbsp;&nbsp;&nbsp;注：</div>
        <div class="plate_line_textarea">
        	<textarea rows="6" cols="25" maxlength="40" id="textarea"><?php echo $textarea;?></textarea>
            <p>0/40</p>
        </div>
    </div>
	
	<div style="max-width:640px;height:10px;"></div>
</div>
<input style="width:60%;height:50px;background-color:#ff0000;text-align:center;cursor:pointer;color:#FFFFFF;font-family:微软雅黑;font-size:18px;border:1px;margin-left:20%;margin-top:10px;" value="下一步" onclick="UP_info();"></input>
<div style="max-width:640px;height:200px;"></div>


</body>
<script type="text/javascript">
function UP_info(){
	//获取备注
	var textarea      =      document.getElementById("textarea").value;
	
	var url="getmessage_all.php?bigtype=18";
	url=url+"&textarea="+textarea;

	$.ajax({
		type:"GET",
		url:url,
		dataType: "json",
		success: function(data){	
			if(data['code']==0001){
				//alert("数据成功上传！");
				window.location.href='index_pay.php';
			}else{
				
			}
		},
		error:function(){
			alert("123");
		}
	});
}
</script>
</html>


